﻿@model List<TJBHJJ.Models.News>
@{
    ViewBag.Title = "公司动态";
    //Layout = "~/Views/Shared/_Layout.cshtml";
    TJBHJJ.Models.Home home = new TJBHJJ.Models.Home();
    int pagecount = (int)ViewData["pageCount"];
    int pageindex = (int)ViewData["pageIndex"];
}
<body id="page5" onload="new ElementMaxHeight();">
    <!-- header -->
    <div id="header">
        <div class="container">
            <div class="row-1">
                <div class="logo">
                    <a href="#">
                        <img alt="" src="@Url.Content("~/images/logo.jpg")" /></a></div>
                <ul class="top-links">
                    <li><a href="#">
                        <img alt="" src="@Url.Content("~/images/top-icon1.jpg")" /></a></li>
                    <li><a href="#">
                        <img alt="" src="@Url.Content("/images/top-icon2.jpg")" /></a></li>
                    <li><a href="#">
                        <img alt="" src="@Url.Content("/images/top-icon3.jpg")" /></a></li>
                </ul>
            </div>
            <div class="row-2">
                <!-- nav box begin -->
                <div class="nav-box">
                    <div class="left">
                        <div class="right">
                            <ul id="nav">
                                <li><a href="@Url.Action("Index", "Home")" class="first"><em><b>主页</b></em></a></li>
                                <li><a href="@Url.Action("CompanyInfo", "Home")"><em><b>公司简介</b></em></a></li>
                                <li><a href="@Url.Action("Index", "Products")"><em><b>案例介绍</b></em></a></li>
                                <li><a href="@Url.Action("Index", "News")" class="current"><em><b>公司动态</b></em></a></li>
                                <li><a href="@Url.Action("Index", "Downloads")"><em><b>资料下载</b></em></a></li>
                                <li><a href="@Url.Action("Add", "Message")" class="last"><em><b>在线留言</b></em></a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <!-- nav box end -->
            </div>
        </div>
    </div>
    <!-- content -->
    <div id="content">
        <div class="container">
            <!-- main-banner-small begin -->
            <div class="main-banner-small">
                <div class="inner">
                    <h1>
                        @Html.Raw(home.SysInfo.Where(x => x.Title == "公司动态").SingleOrDefault().Content)</h1>
                </div>
            </div>
            <!-- main-banner-small end -->
            <div class="wrapper">
                <div class="col-1 maxheight">
                    <!-- box begin -->
                    <div class="box maxheight">
                        <div class="border-top maxheight">
                            <div class="border-right maxheight">
                                <div class="border-bot maxheight">
                                    <div class="border-left maxheight">
                                        <div class="left-top-corner maxheight">
                                            <div class="right-top-corner maxheight">
                                                <div class="right-bot-corner maxheight">
                                                    <div class="left-bot-corner maxheight">
                                                        <div id="ShowList" class="inner">
                                                            <h2>
                                                                公司动态</h2>
                                                            @foreach (var v in Model)
                                                            {
                                                                if (v != null)
                                                                {
                                                                <p>
                                                                    @Ajax.ActionLink(v.Title.Length > 25 ? v.Title.Substring(0, 25) + "..." : v.Title, "Detail",
                                                                    new
                                                                    {
                                                                        page = pageindex,
                                                                        id = v.Id
                                                                    },
                                                                    new AjaxOptions
                                                                    {
                                                                        UpdateTargetId = "ShowContent",
                                                                        InsertionMode = InsertionMode.Replace
                                                                    })
                                                                </p>
                                                                }
                                                            }
                                                            <div class="inner2">
                                                                @Ajax.ActionLink("上一页", "Index", new { page = pageindex > 0 ? pageindex - 1 : 0 }, new AjaxOptions
                                                           {
                                                               UpdateTargetId = "ShowList",
                                                               InsertionMode = InsertionMode.Replace
                                                           })
                                                                @Ajax.ActionLink("下一页", "Index", new { page = pageindex < pagecount ? pageindex + 1 : pagecount }, new AjaxOptions
                                                           {
                                                               UpdateTargetId = "ShowList",
                                                               InsertionMode = InsertionMode.Replace
                                                           })
                                                                当前是第@(pageindex + 1)页，共@(pagecount + 1)页 @*                                                                @Ajax.ActionLink("[首页]", "Index", new { page = 0 },
                                                            new AjaxOptions { UpdateTargetId = "ShowList", InsertionMode = InsertionMode.Replace })
                                                                @for (int i = 1; i < pagecount; i++)
                                                                {
                                                                    if (i == pageindex)
                                                                    {
                                                                    <strong>@Ajax.ActionLink("[" + i + "]", "Index", new { page = i }, new AjaxOptions { UpdateTargetId = "ShowList", InsertionMode = InsertionMode.Replace })</strong>
                                                                    }
                                                                    else
                                                                    {
                                                                    @Ajax.ActionLink("[" + i + "]", "Index", new { page = i }, new AjaxOptions { UpdateTargetId = "ShowList", InsertionMode = InsertionMode.Replace })
                                                                    }
                                                                }
                                                                @Ajax.ActionLink("[末页]", "Index", new { page = pagecount }, new AjaxOptions { UpdateTargetId = "ShowList", InsertionMode = InsertionMode.Replace })
*@
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- box end -->
                </div>
                <div class="col-2 maxheight">
                    <!-- box begin -->
                    <div class="box maxheight">
                        <div class="border-top maxheight">
                            <div class="border-right maxheight">
                                <div class="border-bot maxheight">
                                    <div class="border-left maxheight">
                                        <div class="left-top-corner maxheight">
                                            <div class="right-top-corner maxheight">
                                                <div class="right-bot-corner maxheight">
                                                    <div class="left-bot-corner maxheight">
                                                        <div id="ShowContent" class="inner">
                                                            <h2>
                                                                公司动态简述</h2>
                                                            <dl class="list4">
                                                                <dt></dt>
                                                                <dd>
                                                                    @Html.Raw(home.SysInfo.Where(x => x.Title == "公司动态描述").SingleOrDefault().Content)
                                                                </dd>
                                                            </dl>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- box end -->
                </div>
            </div>
        </div>
    </div>
    <!-- footer -->
    <div id="footer">
        <div class="container">
            @Html.Partial("Footer")
        </div>
    </div>
</body>
